package com.test.book.mapper;

import com.test.book.model.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select * from user_info where user_name = #{name}")
    UserInfo selectByName(String name);

    @Select("select user_name from user_info")
    List<String> selectUserName();

    @Select("select * from user_info where user_name = #{userName} and password = #{password}")
    UserInfo queryUserByCondition(String userName,String password);
}
